export const routes = [
  {
    path: '/',
    name: 'home',
    meta: {
      title: '首页',
    },
    component: () => import('@/views/LoginedHome.vue'),
  },
  {
    path: '/check',
    name: 'check',
    component: () => import('@/components/CheckTest.vue'),
  },
  {
    path: '/screener/add',
    name: 'screenerAdd',
    component: () => import('@/views/screener/addScreener.vue'),
  },
  // 选择学校的页面
  {
    path: '/select/school',
    name: 'schoolSelect',
    component: () => import('@/components/SchoolSelect.vue'),
  },
  // 做题页面
  {
    path: '/topic',
    name: 'topic',
    component: () => import('@/views/topic/TopicIndex.vue'),
  },
  // 题目页面
  // {
  //   path: '/question',
  //   name: 'question',
  //   component: () => import('@/layout/QuestionContainer.vue'),
  //   children: [
  //     {
  //       path: 'reply',
  //       name: 'reply',
  //       component: () => import('@/views/question/Question.vue'),
  //       children: [
  //         {
  //           path: 'reply/:questionId',
  //           name: 'reply_detail',
  //           component: () => import('@/views/question/QuestionDetail.vue'),
  //         },
  //       ],
  //     },
  //   ],
  // },
  {
    path: '/question',
    name: 'question',
    component: () => import('@/layout/QuestionContainer.vue'),
    children: [
      {
        path: 'reply', // 此路径为 /question/reply
        name: 'reply',
        component: () => import('@/views/question/Question.vue'),
        children: [
          {
            path: ':questionId', // 动态路由参数，路径为 /question/reply/:questionId
            name: 'reply_detail',
            component: () => import('@/views/question/QuestionDetail.vue'),
          },
        ],
      },
    ],
  },

  {
    path: '/login',
    name: 'login',
    component: () => import('@/layout/Containers.vue'),
    children: [
      {
        path: 'before',
        name: 'before_login',
        component: () => import('@/views/BeforeLogin.vue'),
      },
      {
        path: 'once',
        name: 'once_login',
        component: () => import('@/views/OnceLogin.vue'),
      },
    ],
  },
]
